package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.OrderDetail;
import com.itheima.reggie.entity.Orders;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderDetailMapper {


    //1.批量插入订单明细表数据
    Integer saveBatch(@Param("orderDetailList") List<OrderDetail> orderDetailList );

    //2.批量插入订单明细表数据的方法(新增订单主表数据)
    @Insert("insert into orders values(null,#{number},#{status},#{userId},#{addressBookId},#{orderTime},#{checkoutTime}," +
            "#{payMethod},#{amount},#{remark},#{phone},#{address},#{userName},#{consignee})")
    void save(Orders orders );






}
